<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
        <?=$meta;?>
        <title><?=$application_name;?></title>
        <link rel="stylesheet" type="text/css" href="<?php echo $this->config->item('css_path').'main.css';?>" rel="stylesheet" type="text/css">
        <link rel="stylesheet" type="text/css" href="<?php echo $this->config->item('css_path').'table_jui.css';?>" />
        <link rel="stylesheet" type="text/css" href="<?php echo $this->config->item('css_path').'themes/smoothness/jquery-ui-1.8.11.custom.css';?>" />
        <link rel="stylesheet" type="text/css" href="<?php echo $this->config->item('css_path').'TableTools_JUI.css';?>" />
        <script type="text/javascript" src="<?php echo $this->config->item('js_path').'jquery.js';?>"></script>
        <script type="text/javascript" src="<?php echo $this->config->item('js_path').'dFilter.js';?>"></script>
        <script type="text/javascript" src="<?php echo $this->config->item('js_path').'jquery-ui-1.8.11.custom.min.js';?>"></script>
        <script type="text/javascript" src="<?php echo $this->config->item('js_path').'jquery.dataTables.js';?>"></script>
        <script type="text/javascript" src="<?php echo $this->config->item('js_path').'ZeroClipboard.js';?>"></script>
        <script type="text/javascript" src="<?php echo $this->config->item('js_path').'TableTools.js';?>"></script>
        <script type="text/javascript">
        <?=$js;?>
        </script>
        <script language="javascript">
        $(document).ready(function() {
        $('tr').hover(
            function () {
                $(this).addClass('ui-state-hover');
            },
            function () {
                $(this).removeClass('ui-state-hover');
            }
        );
        $("tr.table-header").unbind('mouseenter mouseleave');
        });
        function replaceMissingImages(){
            for (var i=0; i<document.images.length; i++){
                img = new Image();
                img.src = document.images[i].src;
                if(img.height == 0) {
                    document.images[i].src = '<?php echo $this->config->item('images_path');?>nopicture.jpg';
                }
            }
        }
        $(function() {
                $(".dialog").dialog();
        });
        $(function() {
                $(".progressbar").progressbar({
                    value: 50
                });
        });
        $(function() {
            $(".datepicker").datepicker({
                dateFormat: 'yy-mm-dd',
                yearRange: 'c-70:c+10',
                changeYear: true,
                changeMonth: true,
                numberOfMonths: 1,
                showWeek: true,
                firstDay: 1,
                showOn: 'button',
                buttonImage: '<?php echo $this->config->item("images_path") . "cal.gif"; ?>',
                buttonImageOnly: true
            });
        });
        </script>
    </head>
    <body onLoad="<?=$resp;?>">
        <div id="wrapper">
            <div id="header">
                <div id="header_left">
                    &nbsp;
                </div>
                <div id="header_right">
                    <center>
                    <img id="logo" src="<?=$this->config->item('images_path');?>logo.jpeg" alt="logo" /><br/>
                    </center>
                    <h1><?=$site_name?></h1>
                    <?php if ($this->session->userdata('real_name')): ?>
                    <div id="header_userinfo">
                    Inició sesión como: <?=$this->session->userdata('real_name')?> <?= anchor('logoff', '[Cerrar Sesion]')?>
                    </div>
                    <?php endif ?>
                </div>
            </div>
            <?php if ($site_menu): ?>
            <div id="tabs">
                <ul>
                        <?=$site_menu?>
                </ul>
                <div class="clear"></div>
            </div>
            <?php endif; ?>
            <div id="main">
                <h2 style="margin-bottom: .2em; color: <?= ($status_color) ? $status_color : "inherit";?> !important"><?=$content_legend?></h2>
                <?php if ($app_menu): ?>
                <div id="tabs">
                    <ul>
                            <?=$app_menu?>
                    </ul>
                    <div class="clear"></div>
                </div>
                <?php endif; ?>
                <div id="appcontent">
                <h2 style="margin-bottom: .2em; color: <?= ($status_color) ? $status_color : "inherit";?> !important"><?=$app_content_legend?></h2>
                    <?=$content_html?>
                </div>
                <div id="footer">
                    Copyright &copy; SistemasMxl, 2011
                </div>
            </div>
        </div>
    </body>
</html>
